import {http} from "../utils/http"

interface phoneparams{
  phone:string
}
interface  codeData{
  data:string
}
interface  tokenData{
  token:string
}
interface  loginparam{
  phone:string
  code:string

}
export  const getcode=(data:phoneparams):Promise<codeData>=>{
  return http.post<codeData>('/sendSMSCode',data)
}
export  const login=(data:loginparam):Promise<tokenData>=>{
  return http.post<tokenData>('/login',data)
}